<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Cetak_surat extends CI_Controller {
        
	public function __construct() {
		parent::__construct();
	}
function load_tahun(){
		
		for ($i = 1; $i <= 40; $i++) 
		{
			$thn = 2020 - $i;
			$tahun[] = array('thn' => $thn);		
		}


		$result["rows"] = $tahun;   
        echo json_encode($result);
	 
	}


function pmbtln_pbb()
    {
        $data['page_title']= 'PEMBETULAN PBB';
        $this->template->set('title', 'PEMBETULAN PBB');   
        $this->template->load('index','cetak_surat/pmbtln_pbb',$data) ; 
    }	


function ctk_pmbtln_pbb(){

	
        $kdprop = $_REQUEST['kdprop'];
        $kdkab = $_REQUEST['kdkab'];
        $kdkec = $_REQUEST['kdkec'];
        $kdlurah = $_REQUEST['kdlurah'];
        $kdblok = $_REQUEST['kdblok'];
        $nourut = $_REQUEST['nourut'];
        $nosurat = $_REQUEST['nosurat'];
		$nmbaru = $_REQUEST['nmbaru'];
        $tgl_terbit = $_REQUEST['tgl_terbit'];
		$tgl_penetapan = $_REQUEST['tgl_penetapan'];
			
		$sql = "	
		SELECT 
		(SELECT nm_propinsi FROM ref_propinsi WHERE kd_propinsi = a.kd_propinsi) AS nm_propinsi,
		(SELECT nm_dati2 FROM ref_dati2 WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2) AS nm_dati2,
		(SELECT nm_kecamatan FROM ref_kecamatan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan) AS nm_kecamatan,
		(SELECT nm_kelurahan FROM ref_kelurahan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan AND kd_kelurahan = a.kd_kelurahan) AS nm_kelurahan,
		a.no_formulir_spop,
		a.nm_kota,
		a.npoptkp,
		a.npoptkp_waris,
		a.rekbphtb
		FROM config a 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $kabupaten = strtoupper($row->nm_dati2);
				$kelurahan = strtoupper($row->nm_kelurahan);
             }
        
 		$sql = "
SELECT CONCAT(a.kd_propinsi,'.',a.kd_dati2,'.',a.kd_kecamatan,'.',a.kd_kelurahan,'.',a.kd_blok,'.',a.no_urut,'.',a.kd_jns_op) AS nop, 
a.nm_wp_sppt,a.jln_wp_sppt,b.jalan_op,b.rw_op,b.rt_op,a.thn_pajak_sppt,a.tgl_jatuh_tempo_sppt,
a.pbb_yg_harus_dibayar_sppt,
a.npwp_sppt,
a.jln_wp_sppt,
a.rt_wp_sppt,
a.rw_wp_sppt,
a.pbb_terhutang_sppt,
	(SELECT jalan_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS jalan_op,
(SELECT rt_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rt_op,
(SELECT rw_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rw_op,
a.pbb_terhutang_sppt


FROM sppt a LEFT JOIN dat_objek_pajak b 
ON a.kd_propinsi = b.kd_propinsi 
AND a.kd_dati2 = b.kd_dati2 
AND a.kd_kecamatan = b.kd_kecamatan
AND a.kd_kelurahan = b.kd_kelurahan 
AND a.kd_blok = b.kd_blok 
AND a.no_urut = b.no_urut 
WHERE a.kd_propinsi = '$kdprop' 
AND a.kd_dati2='$kdkab' 
AND a.kd_kecamatan='$kdkec' 
AND a.kd_kelurahan='$kdlurah' 
AND a.kd_blok='$kdblok' 
AND a.no_urut='$nourut' 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $nop = strtoupper($row->nop);
                $nm_wp_sppt = strtoupper($row->nm_wp_sppt);
                $npwp_sppt = strtoupper($row->npwp_sppt);
				$rt_wp_sppt = strtoupper($row->rt_wp_sppt);
				$rw_wp_sppt = strtoupper($row->rw_wp_sppt);
				$rt_op = strtoupper($row->rt_op);
				$rw_op = strtoupper($row->rw_op);
			
                $jln_wp_sppt = strtoupper($row->jln_wp_sppt);
                $jalan_op = strtoupper($row->jalan_op);
				
                $thn_pajak_sppt = strtoupper($row->thn_pajak_sppt);
                $pbb_terhutang_sppt = strtoupper($row->pbb_terhutang_sppt);
                $pbb_yg_harus_dibayar_sppt = strtoupper($row->pbb_yg_harus_dibayar_sppt);
                $tgl_jatuh_tempo_sppt = strtoupper($row->tgl_jatuh_tempo_sppt);				
             }       
        $cRet = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" width=\"549\" ALIGN=\"CENTER\"><b>PEMERINTAH $kabupaten</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\"><b>DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET DAERAH</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\">JL. TRANS PAPUA NABIRE-ENAROTALI KM 200 - MOENAMANI</td>
  </tr>
    <tr height=\"20\">
    <td colspan=\"6\" height=\"20\">
		<HR>
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
  </tr>

  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">KEPUTUSAN KEPALA DINAS</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">NOMOR $nosurat</td>

  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">TENTANG</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td></td>
	<td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">PEMBETULAN PBB</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">ATAS SPPT NOMOR $nop TANGGAL $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>

  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Membaca &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</td>
    <td colspan=\"5\" height=\"61\" width=\"549\"ALIGN=\"LEFT\" VALIGN=\"TOP\">Surat pemohonan pembetulan PBB yang diajukan secara perseorangan oleh Wajib  Pajak/kuasa dari Wajib Pajak *) HI. TIMANG Nomor --- tanggal --- atas SPPT Nomor 72.06.010.005-001.0035.0 tanggal 14 Mei 2013 Tahun Pajak 2013 yang diterima DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET $kabupaten berdasarkan tanda terima Nomor 2013.0002.086 tanggal 23 Desember 2013;
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menimbang &nbsp;&nbsp;&nbsp;:</td>
    <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Bahwa berdasarkan hasil penelitian sebagaimana dituangkan dalam laporan Hasil Penelitian  Pembetulan PBB Nomor 0002 tanggal 23 Desember 20013 terdapat/tidak terdapat *) cukup alasan untuk membetulkan kesalahan tulis/kesalahan hitung/kekeliruan penerapan ketentuan tertentu dalam peraturan;.
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Mengingat : &nbsp;1.</td>
    <td colspan=\"5\" height=\"20\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Undang-Undang Nomor 6 Tahun 1983 tentang ketentuan Umum dan tata Cara Perpajakan sebagaimana telah beberapa kali diubah terakhir dengan undang-undang Nomor 28 Tahun 2007;
	</td>
  </tr>
  <tr height=\"61\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.</td>
    <td colspan=\"5\" height=\"20\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Undang-Undang Nomor 12 Tahun 1985 tentang Pajak Bumi dan Bangunan sebagaimana Telah diubah dengan Undang-Undang Nomor 12 Tahun 1994;
	</td>
  </tr>
  <tr height=\"61\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.</td>
    <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Peraturan Pemerintah Nomor 80 Tahun 2007 tentang Tata Cara Pelaksanaan Hak dan Kewajiban Perpajakan Berdasarkan Undang-Undang Nomor 6 Tahun 1983 tentang ketentuan umum dan Tata Cara Perpajakan sebagaimana telah beberapa kali diubah terakhir dengan undang-undang Nomor 28 Tahun 2007;
	</td>
  </tr>
  <tr height=\"61\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.</td>
    <td colspan=\"5\" height=\"20\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Peraturan Kepala Dinas Pendapatan Pengelolaan Keuangan dan Aset Nomor 19/PMK.03/2008 tentang Tata cara Pembetulan Kesalahan Tulis, Kesalahan Hitung, dan/atau Kekeliruan Penerapan Ketentuan Tertentu dalam Peraturan Perundang-undangan Perpajakan;
	</td>
  </tr>
   <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.</td>
    <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Peraturan Kepala Dinas Pendapatan Pengelolaan Keuangan dan Aset Nomor 37/PJ/2008 tentang Tata Cara Pembetulan Kesalahan Tulis, Kesalahan Hitung , dan/atau Kekeliruan Penerapan Ketentuan Tertentu dalam peraturan Perundang-undangan Pajak Bumi dan Bangunan dan Bea Perolehan Hak atas Tanah dan Bangunan;
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
	<td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">MEMUTUSKAN:</td>
  </tr>
  <tr height=\"20\">
    <td height=\"10\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td></td>
  </tr>
  <tr height=\"61\">
	<td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menetapkan :</td>
    <td colspan=\"5\" height=\"20\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">KEPUTUSAN KEPALA DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET TENTANG PEMBETULAN PBB ATAS SPPT NOMOR $nop TANGGAL $tgl_terbit.
	</td>
  </tr>
  <tr height=\"61\">
    <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\">PERTAMA :</td>
    <td colspan=\"5\" height=\"20\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Menerima seluruhnya permohonan pembetulan PBB atas SPPT Nomor $nop tanggal $tgl_terbit.
	</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\"></td>
    <td height=\"20\" colspan=\"2\">NAMA WAJIB PAJAK</td>
    <td colspan=\"3\">: $nm_wp_sppt</td>
  </tr>

  <tr height=\"20\">
  <td height=\"20\" width=\"50\" ALIGN=\"TOP\"></td>
    <td height=\"20\" colspan=\"2\">NOP</td>
    <td  colspan=\"3\">: $nop</td>
  </tr>
  
  <tr height=\"20\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\"></td>
    <td height=\"20\" colspan=\"2\">ALAMAT WAJIB PAJAK</td>
    <td colspan=\"3\">: BLOK PERUMAHAN RT $rt_wp_sppt/RW $rw_wp_sppt $kelurahan</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\"></td>
    <td height=\"20\" colspan=\"2\">ALAMAT OBJEK PAJAK</td>
    <td colspan=\"3\">: BLOK PERUMAHAN RT $rt_op/RW $rw_op $kelurahan</td>
  </tr>
 
  <tr height=\"61\">
	<td height=\"20\" width=\"50\" ALIGN=\"TOP\" ALIGN=\"LEFT\" VALIGN=\"TOP\">KEDUA &nbsp;&nbsp;&nbsp; :</td>
    <td colspan=\"5\" height=\"20\" width=\"549\" ALIGN=\"LEFT\"VALIGN=\"TOP\">Sesuai Diktum PERTAMA, rincian pembetulan sebagai berikut :
	</td>
  </tr>
  <tr height=\"50\">
    <td height=\"50\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
   <tr height=\"50\">
    <td height=\"50\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
    <tr height=\"50\">
    <td height=\"50\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
    <tr height=\"50\">
    <td height=\"50\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  </table><br />";
$cRet .= "  
  <table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"100%\">
   
  <tr height=\"20\">
    <td height=\"20\" align=\"center\">NO</td>
   
    <td align=\"center\">Uraian</td>
    <td align=\"center\">Semula</td>
    <td align=\"center\">Hasil Pembetulan</td>
  </tr>
";  
  		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $nop = strtoupper($row->nop);
                $nm_wp_sppt = strtoupper($row->nm_wp_sppt);
                $npwp_sppt = strtoupper($row->npwp_sppt);
                $jln_wp_sppt = strtoupper($row->jln_wp_sppt);
                $jalan_op = strtoupper($row->jalan_op);
				
                $thn_pajak_sppt = strtoupper($row->thn_pajak_sppt);
                $pbb_terhutang_sppt = strtoupper($row->pbb_terhutang_sppt);
                $pbb_yg_harus_dibayar_sppt = strtoupper($row->pbb_yg_harus_dibayar_sppt);
                $tgl_jatuh_tempo_sppt = strtoupper($row->tgl_jatuh_tempo_sppt);		
				
				$no = $i+1;
				$cRet .= "  
				  <tr height=\"20\">
					<td height=\"20\" align=\"center\">$no</td>
				
					<td align=\"center\">Pembetulan Nama</td>
					<td align=\"center\">$nm_wp_sppt</td>
					<td align=\"center\">$nmbaru</td>
				  </tr>
				";						
             }       


 $cRet .= "  
</table>
";           
        $cRet .= "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
  <tr height=\"20\">
    <td height=\"20\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
  </tr>
<tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
<tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td height=\"30\" width=\"100\" colspan=\"2\">Ditetapkan di Moanamani</td>

 </tr>
  <tr height=\"20\" width=\"20\">
    <td height=\"20\" width=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td height=\"30\" width=\"100\" colspan=\"2\">pada tanggal $tgl_penetapan</td>

  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <tdheight=\"30\" width=\"100\" colspan=\"2\">Kepala Dinas,</td>

  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td height=\"20\" width=\"100\" colspan=\"2\">SUMIRAN, SH</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td height=\"20\" width=\"50\" colspan=\"2\">NIP.196311051986021004</td>
	</tr>
  </table>";
        //echo $cRet;
        $data['prev']= $cRet;    
        $this->mdata->_mpdf('',$cRet,'15','15',5,'0');
    }

function keterangan_njop()
    {
        $data['page_title']= 'SURAT KETERANGAN NJOP';
        $this->template->set('title', 'SURAT KETERANGAN NJOP');   
        $this->template->load('index','cetak_surat/keterangan_njob',$data) ; 
    }	
	


	function ctk_keterangan_njop(){

	
        $kdprop = $_REQUEST['kdprop'];
        $kdkab = $_REQUEST['kdkab'];
        $kdkec = $_REQUEST['kdkec'];
        $kdlurah = $_REQUEST['kdlurah'];
        $kdblok = $_REQUEST['kdblok'];
        $nourut = $_REQUEST['nourut'];
        $nosurat = $_REQUEST['nosurat'];
		$tgl_penetapan = $_REQUEST['tgl_penetapan'];
			
//		$sql = "	
//		SELECT 
//		(SELECT nm_propinsi FROM ref_propinsi WHERE kd_propinsi = a.kd_propinsi) AS nm_propinsi,
//		(SELECT nm_dati2 FROM ref_dati2 WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2) AS nm_dati2,
//		(SELECT nm_kecamatan FROM ref_kecamatan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan) AS nm_kecamatan,
//		(SELECT nm_kelurahan FROM ref_kelurahan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan AND kd_kelurahan = a.kd_kelurahan) AS nm_kelurahan,
//		a.no_formulir_spop,
//		a.nm_kota,
//		a.npoptkp,
//		a.npoptkp_waris,
//		a.rekbphtb
//		FROM config a 
//		";        




$sql = "SELECT a.kd_propinsi,a.nm_propinsi,b.kd_dati2,b.nm_dati2,c.kd_kecamatan,c.nm_kecamatan,d.kd_kelurahan,d.nm_kelurahan FROM ref_propinsi a
INNER JOIN ref_dati2 b ON a.kd_propinsi=b.kd_propinsi
INNER JOIN ref_kecamatan c ON b.kd_propinsi=c.kd_propinsi AND b.kd_dati2=c.kd_dati2 	
INNER JOIN ref_kelurahan d ON c.kd_propinsi=d.kd_propinsi AND c.kd_dati2=d.kd_dati2 AND c.kd_kecamatan=d.kd_kecamatan where a.kd_propinsi='$kdprop' and b.kd_dati2='$kdkab' and c.kd_kecamatan='$kdkec' and d.kd_kelurahan='$kdlurah'"; 

		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
			    $propinsi = strtoupper($row->nm_propinsi);
                $kabupaten = strtoupper($row->nm_dati2);
				$nm_kecamatan = strtoupper($row->nm_kecamatan );
				$kelurahan = strtoupper($row->nm_kelurahan);
             }
		
		
$sql = "SELECT CONCAT(b.kd_propinsi,'.',b.kd_dati2,'.',b.kd_kecamatan,'.',b.kd_kelurahan,'.',b.kd_blok,'.',b.no_urut,'.',b.kd_jns_op) AS nop, 
b.jalan_op,b.rw_op,b.rt_op,b.total_luas_bumi,b.total_luas_bng,b.njop_bumi,b.njop_bng, 
a.nm_wp,a.jalan_wp,a.npwp,a.rt_wp,a.rw_wp,a.kota_wp,a.kelurahan_wp FROM dat_subjek_pajak a
INNER JOIN dat_objek_pajak b ON a.subjek_pajak_id=b.subjek_pajak_id WHERE b.kd_propinsi = $kdprop AND b.kd_dati2= $kdkab AND b.kd_kecamatan=$kdkec AND b.kd_kelurahan=$kdlurah AND b.kd_blok=$kdblok AND b.no_urut=$nourut ";

		
		     $hasil = $this->db->query($sql);
			 
			 
             $i = 0;			 
             foreach ($hasil->result() as $row)
             {
                $nop = strtoupper($row->nop);
                $jalan_op = strtoupper($row->jalan_op);
                $rw_op = strtoupper($row->rw_op);
				$rt_op = strtoupper($row->rt_op);
				$total_luas_bumi = strtoupper($row->total_luas_bumi);

				$total_luas_bng = strtoupper($row->total_luas_bng);
				$njop_bumi = strtoupper($row->njop_bumi);
				$njop_bng = strtoupper($row->njop_bng);
				
				$nm_wp = strtoupper($row->nm_wp);
				$jalan_wp = strtoupper($row->jalan_wp);
				$npwp = strtoupper($row->npwp);
				$rt_wp = strtoupper($row->rt_wp);
				$rw_wp = strtoupper($row->rw_wp);
				$kota_wp = strtoupper($row->kota_wp);
				$kelurahan_wp = strtoupper($row->kelurahan_wp);

				
             }    


		
		$bumi_njop =  $njop_bumi / $total_luas_bumi;	
		
		if ($total_luas_bng==0){
	
		$bng_njop = 0;			
		$njop_sppt= $njop_bumi + 0;


		}else{
		$bng_njop = $njop_bng / $total_luas_bng;			
		$njop_sppt= $njop_bumi + $njop_bng;
		
		}
		$njop = number_format($njop_sppt,2,'.',',');
		$bnjop = number_format($bumi_njop,2,'.',',');
		$gnjop = number_format($bng_njop,2,'.',',');
		$bnjop_sppt = number_format($njop_bumi,2,'.',',');
		$gnjop_sppt = number_format($njop_bng,2,'.',',');  
		
		
		
		//------------
		
		
		if ( $total_luas_bng ==0) {
		
		
				$sql = "SELECT  jns_bumi FROM dat_op_bumi  
WHERE kd_propinsi = $kdprop AND kd_dati2= $kdkab AND kd_kecamatan=$kdkec AND kd_kelurahan=$kdlurah AND kd_blok=$kdblok AND no_urut=$nourut limit 1";

 $hasilx = $this->db->query($sql);	
 
  foreach ($hasilx->result() as $row)
  
  
             {
                $jns_bumi = strtoupper($row->jns_bumi);

			 }    
 
	                $kd_jpb = '';
               		$nm_jpb_jpt = '';	
		
		
		}else{
		
			$sql = "SELECT a.kd_propinsi, a.kd_dati2, a.kd_kecamatan, a.kd_kelurahan, a.kd_blok, a.no_urut, a.jns_bumi,b.kd_jpb,c.nm_jpb_jpt FROM dat_op_bumi a
INNER JOIN dat_op_bangunan b ON a.kd_propinsi=b.kd_propinsi AND a.kd_dati2=b.kd_dati2 AND a.kd_kecamatan=b.kd_kecamatan AND a.kd_kelurahan=b.kd_kelurahan
AND a.kd_blok=b.kd_blok AND a.no_urut=b.no_urut  AND a.kd_jns_op=b.kd_jns_op
INNER JOIN jpb_jpt c ON b.kd_jpb=c.kd_jpb_jpt AND a.no_urut = b.no_urut 
WHERE a.kd_propinsi = $kdprop AND a.kd_dati2= $kdkab AND a.kd_kecamatan=$kdkec AND a.kd_kelurahan=$kdlurah AND a.kd_blok=$kdblok AND a.no_urut=$nourut limit 1";

 $hasilx = $this->db->query($sql);	
 
  foreach ($hasilx->result() as $row)
             {
                $jns_bumi = strtoupper($row->jns_bumi);
                $kd_jpb = strtoupper($row->kd_jpb);
                $nm_jpb_jpt = strtoupper($row->nm_jpb_jpt);
			 }    
 
}


  if ($jns_bumi=='1') {
        $nmjns = 'Tanah & Bangunan';
       } 
	   
 if ($jns_bumi=='2'){  
	   
        $nmjns = 'Kavling Siap Bangun';
       } 
 if ($jns_bumi=='3'){  
    $nmjns  = 'Tanah Kosong';
     } 
 if ($jns_bumi=='4'){
    $nmjns   = 'Fasilitas Umum';
     }

		


        $cRet = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"  width='100%'>
<tr>
	<td rowspan=\"6\" colspan=\"1\" height=\"70\" width=\"75\" ALIGN=\"CENTER\"><img src=\"".base_url()."public/images/logo.png\" width=\"78\" height=\"90\" /></td>
</tr>
<tr height=\"5\">
	<td colspan=\"4\" height=\"5\" style=\"font-size:15px\"width=\"549\" ALIGN=\"CENTER\">PEMERINTAH $kabupaten</td>
</tr>
<tr height=\"5\">
	<td colspan=\"4\" height=\"5\"style=\"font-size:20px\" ALIGN=\"CENTER\"><b>DINAS PENDAPATAN PENGELOLAAN</b></td>
</tr>
<tr height=\"5\">
	<td colspan=\"4\" height=\"5\"style=\"font-size:20px\" ALIGN=\"CENTER\"><b>KEUANGAN DAN ASET DAERAH</b></td>
</tr>
<tr height=\"5\">
	<td colspan=\"4\" height=\"5\" style=\"font-size:15px\"ALIGN=\"CENTER\">JL. TRANS PAPUA NABIRE-ENAROTALI KM 200 - MOENAMANI</td>
</tr>
<tr height=\"5\">
	<td colspan=\"4\" height=\"5\" style=\"font-size:15px\"ALIGN=\"CENTER\">DOGIYAI - 2xxxx</td>
</tr>
<tr height=\"20\">
    <td colspan=\"6\" height=\"20\">
		<HR>

	</td>
</tr>


<tr height=\"10\">
    <td height=\"10\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
</tr>

<tr height=\"10\"> 
 
    <td height=\"10\" style=\"font-size:13px\"colspan=\"6\" ALIGN=\"CENTER\"><b>SURAT KETERANGAN NILAI JUAL OBJEK PAJAK (NJOP) PBB-P2</b></td>


	
</tr>  
<tr height=\"20\">  
    <td height=\"20\" colspan=\"6\"  style=\"font-size:14px\" ALIGN=\"CENTER\" >Nomor: $nosurat</td>
</tr>  

<tr height=\"20\">  
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>  
<tr height=\"20\"> 
    <td height=\"20\" colspan=\"6\"style=\"font-size:14px\" ALIGN=\"LEFT\">Yang bertanda tangan di bawah ini:</td>
</tr>  
<tr height=\"20\">   
    <td height=\"20\" style=\"font-size:14px\"colspan=\"2\">1.  Nama</td>
    <td style=\"font-size:13px\"colspan=\"4\">: RICKY S.R SIREGAR, S.IP, MP</td>
</tr>  

<tr height=\"20\">   
    <td height=\"20\" style=\"font-size:14px\"colspan=\"2\">2.  NIP.</td>
    <td style=\"font-size:14px\"colspan=\"4\">: 19780212 200502 1 002</td>
</tr>  

<tr height=\"20\">   
    <td height=\"20\" style=\"font-size:14px\"colspan=\"2\">3.  Jabatan</td>
    <td style=\"font-size:14px\"colspan=\"4\">: Kabid Pengelola Pendapatan Pada Dinas Pendapatan Pengelolaan Keuangan dan Asset Daerah Kabupaten Dogiyai</td>
</tr>  
<tr height=\"20\">  
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td></td>
	<td></td>
</tr>  
<tr height=\"20\">  
    <td height=\"20\" style=\"font-size:14px\"colspan=\"6\" ALIGN=\"JUSTIFY\">Bahwa sesuai dengan ketentuan Peraturan Pemerintah Nomor 71 Tahun 2008 tentang Perubahan ketiga atas PP nomor 48 Tahun 1994 tentang Pembayaran Pajak Penghasilan atas Penghasilan dari Pengalihan Hak atas Tanah dan/atau Bangunan, Peraturan Daerah Kabupaten Dogiyai No. 2 Tahun 2011 tentang Bea Perolehan Hak Atas Tanah dan/atau Bangunan dan Peraturan Daerah Kabupaten Dogiyai Nomor : 2 Tahun 2012 tentang Pajak Daerah, dengan ini menerangkan bahwa sesuai basis data PBB-P2 yang ada pada Dinas Pendapatan Pengelolaan Keuangan dan Asset Kabupaten Dogiyai, atas objek pajak :</td>
</tr>  
<tr height=\"20\">   
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>  


  </table>";

	$cRet .="
	<table width='100%' border='0' cellpadding='0' cellspacing='0' style=\"font-size:14px\">

<tr height=\"20\">  

	
	 <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">Nomor Objek Pajak</td>
    <td colspan=\"1\"width='1%'>: </td>
	<td colspan=\"1\" ALIGN=\"left\" width='70%'>$nop </td>
		
</tr>  
<tr height=\"20\">  

	 <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">Jenis Objek Pajak</td>
    <td colspan=\"1\"width='1%'>: </td>
	<td colspan=\"1\" ALIGN=\"left\" width='70%'>$nmjns </td>


</tr>  
  <tr height=\"20\">

	 <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">Jenis Penggunaan</td>
    <td colspan=\"1\"width='1%'>: </td>
	<td colspan=\"1\" ALIGN=\"left\" width='70%'>$nm_jpb_jpt </td>


  </tr>
  <tr height=\"20\">

	 <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">Letak Objek Pajak</td>
    <td colspan=\"1\"width='1%'>: </td>
	<td colspan=\"1\" ALIGN=\"left\" width='70%'>$jalan_op </td>


  </tr>
   <tr height=\"20\">
   
	 <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\"></td>
    <td colspan=\"1\"width='1%'>: </td>
    <td style=\"font-size:14px\" colspan=\"4\" width='70%'>RT.$rt_op/RW.$rw_op, $kelurahan, $nm_kecamatan</td>
	
  </tr>
  <tr height=\"20\">

  
  	 <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\"></td>
    <td colspan=\"1\"width='1%'> </td>
    <td style=\"font-size:14px\" colspan=\"4\" width='70%'>$kabupaten</td>

  
  </tr>
 
   </table>";
   

	$cRet .="
	<table width='100%' border='0' cellpadding='0' cellspacing='0' >
	 
 <tr height=\"20\">
    <td height=\"20\" style=\"font-size:14px\" colspan=\"6\" ALIGN=\"LEFT\">diperoleh data sebagai berikut:</td>
 </tr> 
 
 </table>";


	$cRet .="
	<table width='100%' border='0' cellpadding='0' cellspacing='0' style=\"font-size:14px\">
 
 
 <tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">Luas Bumi</td>
    <td colspan=\"2\"  width='1%'>: </td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'>$total_luas_bumi M2 </td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'></td>
	<td colspan=\"2\" width='8%'></td>
  </tr>

 <tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">Luas Bangunan</td>
    <td colspan=\"2\" width='1%'>: </td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'>$total_luas_bng M2 </td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'></td>
	<td colspan=\"2\" width='8%'></td>
  </tr>


<tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">NJOP Bumi</td>
    <td colspan=\"2\" width='1%'>: </td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'>$total_luas_bumi M2 </td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>x Rp.</td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'>$bnjop /M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>= Rp.</td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'>$bnjop_sppt </td>
	<td colspan=\"2\" width='8%'></td>
  </tr>
  

<tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">NJOP Bumi Bersama</td>
    <td colspan=\"2\" width='1%'>: </td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'>0 M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>x Rp.</td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'>0 M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>= Rp.</td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'>0 </td>
	<td colspan=\"2\" width='8%'></td>
  </tr>

  
  <tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">NJOP Bangunan</td>
    <td colspan=\"2\" width='1%'>: </td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'>$total_luas_bng M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>x Rp. </td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'>$gnjop /M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>= Rp. </td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'>$gnjop_sppt </td>
	<td colspan=\"2\" width='8%'></td>
  </tr>



  
    <tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">NJOP Bangunan Bersama</td>
    <td colspan=\"2\" width='1%'>: </td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'>0 M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>x Rp. </td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'>0/M2</td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>= Rp. </td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'>0 </td>
	<td colspan=\"2\" width='8%'></td>
  </tr>
  
   
      <tr height=\"20\">
 
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\"></td>
    <td colspan=\"2\" width='1%'></td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'>-----------------------</td>
	<td colspan=\"2\" width='8%'></td>
		
  </tr>
  
 <tr height=\"20\">

	
    <td height=\"20\"  width='33%' style=\"font-size:14px\" colspan=\"2\">NJOP KESELURUHAN TAHUN 2014</td>
    <td colspan=\"2\" width='1%'></td>
	<td colspan=\"2\" ALIGN=\"right\" width='13%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'></td>
	<td colspan=\"2\"ALIGN=\"right\" width='15%'></td>
	<td colspan=\"2\" ALIGN=\"right\"width='6%'>= Rp. </td>
	<td colspan=\"2\" ALIGN=\"right\"width='18%'>$njop </td>
	<td colspan=\"2\" width='8%'></td>	
	
	
 </tr>

    
  
 
 </table>";

 $cRet .= "
 <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"  width='100%'>
 



 <tr height=\"20\">
	<td height=\"20\" style=\"font-size:14px\"colspan=\"2\" ALIGN=\"LEFT\">Terbilang </td>
	<td height=\"20\" style=\"font-size:14px\"colspan=\"2\" ALIGN=\"LEFT\"> : (".$this->mdata->terbilang_uang($njop_sppt).")</td>
 
 </tr> 
 <tr height=\"20\">
    <td height=\"20\" style=\"font-size:14px\"colspan=\"2\">Nama Wajib Pajak</td>
    <td style=\"font-size:14px\" colspan=\"4\">: $nm_wp</td>
 </tr>
   <tr height=\"20\">
    <td height=\"20\" style=\"font-size:14px\"colspan=\"2\">Alamat Wajib Pajak</td>
    <td style=\"font-size:14px\"colspan=\"4\">: $jalan_wp $kota_wp</td>
  </tr>
    <tr height=\"20\">
    <td height=\"20\" style=\"font-size:14px\"colspan=\"2\">NPWPD</td>
    <td style=\"font-size:14px\"colspan=\"4\">: $npwp</td>
  </tr>
  
  <tr height=\"20\">   
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>  
  
  <tr height=\"20\">  
    <td height=\"20\" style=\"font-size:14px\"colspan=\"6\" ALIGN=\"JUSTIFY\">Demikian surat Keterangan NJOP PBB-P2 ini diperbuat untuk dapat dipergunakan seperlunya. Apabila kemudian hari terdapat kekeliruan didalamnya, akan diperbaiki sesuai dengan ketentuan yang berlaku.</td>
</tr>  
  
  
</table>";
//-------
          
$cRet .= " 
	<table cellspacing=\"0\" style=\"font-size:14px\" cellpadding=\"0\" border=\"0\"  width='100%'>
  <tr height=\"20\">
    <td height=\"20\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
  </tr>
  
  
    <tr height=\"20\">   
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>  

  <tr height=\"30\" width=\"20\">
    <td height=\"20\" width=\"20\"></td>
    <td></td>
    <td></td>
	<td height=\"20\" width=\"100\"  ALIGN=\"CENTER\"colspan=\"4\">Moanamani, $tgl_penetapan</td></tr> 
  <tr height=\"10\">
    <td height=\"10\"></td>
    <td></td>
    <td></td>       
    <td height=\"10\" width=\"100\"  ALIGN=\"CENTER\"colspan=\"4\">An. KEPALA DINAS PENDAPATAN PENGELOLAAN</td>
  </tr>

  <tr height=\"10\">
    <td></td>
    <td></td>
    <td></td>       
    <td height=\"10\" width=\"100\"  ALIGN=\"CENTER\"colspan=\"4\">KEUANGAN DAN ASSET DAERAH $kabupaten,</td>
  </tr>

  
  <tr height=\"10\">
    <td></td>
    <td></td>
    <td></td>
    <td height=\"10\" width=\"100\"  ALIGN=\"CENTER\"colspan=\"4\">KABID PENGELOLA PENDAPATAN,</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>

 <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>


  <tr height=\"10\">
    <td height=\"10\"></td>
    <td></td>
    <td></td>
    <td height=\"10\" width=\"100\"  ALIGN=\"CENTER\"colspan=\"4\">RICKY S.R SIREGAR, S.IP, MP</td>
  </tr>

  <tr height=\"10\">
    <td height=\"10\"></td>
    <td></td>
    <td></td>
    <td height=\"10\" width=\"100\"  ALIGN=\"CENTER\"colspan=\"4\">PENATA</td>
  </tr>


  <tr height=\"10\">
    <td height=\"10\"></td>
    <td></td>
    <td></td>
	<td height=\"10\" width=\"50\" ALIGN=\"CENTER\"colspan=\"4\">NIP.19780212 200502 1 002</td>
	</tr>
  </table>";

 //echo $cRet;
        $data['prev']= $cRet;    
       	$this->template->set('title', 'CETAK KETERANGAN NJOP');
        echo $cRet; 
        //$this->mdata->_mpdf('',$cRet,'15','15',5,'0');
}	







function keuangan_aset()
    {
        $data['page_title']= 'PEMBETULAN PBB';
        $this->template->set('title', 'PEMBETULAN PBB');   
        $this->template->load('index','cetak_surat/keuangan_aset',$data) ; 
    }	

	
function ctk_keuangan_aset(){

	
        $kdprop = $_REQUEST['kdprop'];
        $kdkab = $_REQUEST['kdkab'];
        $kdkec = $_REQUEST['kdkec'];
        $kdlurah = $_REQUEST['kdlurah'];
        $kdblok = $_REQUEST['kdblok'];
        $nourut = $_REQUEST['nourut'];
        $nosurat = $_REQUEST['nosurat'];
		//$thn_pajak = $_REQUEST['thn_pajak'];
		$thn_pjk = $_REQUEST['thn_pjk'];
        $tgl_terbit = $_REQUEST['tgl_terbit'];
	
			
		$sql = "	
		SELECT 
		(SELECT nm_propinsi FROM ref_propinsi WHERE kd_propinsi = a.kd_propinsi) AS nm_propinsi,
		(SELECT nm_dati2 FROM ref_dati2 WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2) AS nm_dati2,
		(SELECT nm_kecamatan FROM ref_kecamatan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan) AS nm_kecamatan,
		(SELECT nm_kelurahan FROM ref_kelurahan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan AND kd_kelurahan = a.kd_kelurahan) AS nm_kelurahan,
		a.no_formulir_spop,
		a.nm_kota,
		a.npoptkp,
		a.npoptkp_waris,
		a.rekbphtb
		FROM config a 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $kabupaten = strtoupper($row->nm_dati2);
				$kelurahan = strtoupper($row->nm_kelurahan);
             }
        
 		$sql = "
SELECT CONCAT(a.kd_propinsi,'.',a.kd_dati2,'.',a.kd_kecamatan,'.',a.kd_kelurahan,'.',a.kd_blok,'.',a.no_urut,'.',a.kd_jns_op) AS nop, 
a.nm_wp_sppt,a.jln_wp_sppt,b.jalan_op,b.rw_op,b.rt_op,a.thn_pajak_sppt,a.tgl_jatuh_tempo_sppt,
a.pbb_yg_harus_dibayar_sppt,
a.npwp_sppt,
a.jln_wp_sppt,
a.rt_wp_sppt,
a.rw_wp_sppt,
	(SELECT jalan_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS jalan_op,
(SELECT rt_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rt_op,
(SELECT rw_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rw_op,
a.pbb_terhutang_sppt


FROM sppt a LEFT JOIN dat_objek_pajak b 
ON a.kd_propinsi = b.kd_propinsi 
AND a.kd_dati2 = b.kd_dati2 
AND a.kd_kecamatan = b.kd_kecamatan
AND a.kd_kelurahan = b.kd_kelurahan 
AND a.kd_blok = b.kd_blok 
AND a.no_urut = b.no_urut 
WHERE a.kd_propinsi = '$kdprop' 
AND a.kd_dati2='$kdkab' 
AND a.kd_kecamatan='$kdkec' 
AND a.kd_kelurahan='$kdlurah' 
AND a.kd_blok='$kdblok' 
AND a.no_urut='$nourut' 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $nop = strtoupper($row->nop);
                $nm_wp_sppt = strtoupper($row->nm_wp_sppt);
                $npwp_sppt = strtoupper($row->npwp_sppt);
				$rt_wp_sppt = strtoupper($row->rt_wp_sppt);
				$rw_wp_sppt = strtoupper($row->rw_wp_sppt);
				$rt_op = strtoupper($row->rt_op);
				$rw_op = strtoupper($row->rw_op);
                $jln_wp_sppt = strtoupper($row->jln_wp_sppt);
                $jalan_op = strtoupper($row->jalan_op);
				
                $thn_pajak_sppt = strtoupper($row->thn_pajak_sppt);
                $pbb_terhutang_sppt = strtoupper($row->pbb_terhutang_sppt);
                $pbb_yg_harus_dibayar_sppt = strtoupper($row->pbb_yg_harus_dibayar_sppt);
                $tgl_jatuh_tempo_sppt = strtoupper($row->tgl_jatuh_tempo_sppt);				
             }       
        $cRet = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" width=\"549\" ALIGN=\"CENTER\"><b>PEMERINTAH $kabupaten</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\"><b>DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET DAERAH</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\">JL. TRANS PAPUA NABIRE-ENAROTALI KM 200 - MOENAMANI</td>
  </tr>
    <tr height=\"20\">
    <td colspan=\"6\" height=\"20\">
		<HR>
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
  </tr>

  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>KEPUTUSAN KEPALA DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET</B></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">NOMOR $nosurat</td>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"></td>
  </tr>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>TENTANG</B></td>
  </tr>
  <tr height=\"20\">
  	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>PERBAIKAN/PEMBETULAN KEPUTUSAN KEPALA DINAS</B></td>
  </tr>
  <tr height=\"20\">
  	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">NOMOR: $nosurat TANGGAL $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>PENYELESAIAN KEBERATAN WAJIB PAJAK ATAS SPPT/SKP PBB </B></td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"></td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>KEPALA DINAS</B></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menimbang	:  1.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Bahwa terdapat kesalahan/kekeliruan salam Surat Keputusan Kepala Dinas Pendapatan Pengelolaan Keuangan Dan Aset Nomor : $nosurat Tanggal : $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:  2.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Bahwa perbaikan/pembetulan dimaksud perlu dituangkan dalam Surat Keputusan Kepala Dinas Pendapatan Pengelolaan Keuangan Dan Aset.</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:  3.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Bahwa kesalahan/kekeliruan tersebut perlu dilakukan perbaikan/pembetulan sebagaimana mestinya.</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Memperhatikan: 1.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Berita Acara Pemeriksaan Sederhana Kantor Nomor : 0002 Tanggal : $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:  2.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Berita Acara Pemeriksaan Sederhana Lapangan Nomor : 0003 Tanggal : $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Mengingat	:  1.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Pasal 15 dan 16 Undang-undang Nomor 12 Tahun 1985 sebagaimana telah diubah dengan Undang-undang Nomor 12 Tahun 1994.</td>
  </tr>
  <tr>
	<td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:  2.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Keputusan Kepala Dinas Pendapatan Pengelolaan Keuangan Dan Aset Nomor : Kep-22/PJ/1995 tanggal 27 Februari 1995, sebagaimana telah diubah terakhir dengan keputusan Kepala Dinas Pendapatan Pengelolaan Keuangan dan Aset Nomor: Kep-172/PJ/1998.</td>
  </tr>
  <tr>
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:  3.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Keputusan Kepala Dinas Pendapatan Pengelolaan Keuangan dan Aset Nomor :Kep-59/PJ/2000 tanggal 10 Maret 2000 tentang Tata Cara Pengajuan dan Penyelesaian Keberatan Pajak Bumi dan Bangunan</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>

  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
  <td height=\"20\" ALIGN=\"CENTER\" colspan=\"6\" VALIGN=\"TOP\">MEMUTUSKAN</td>
  </tr>
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Membaca</td>
    <td colspan=\"5\" height=\"61\" width=\"549\"ALIGN=\"LEFT\" VALIGN=\"TOP\">KEPUTUSAN KEPALA DINAS TENTANG PERBAIKAN/PEMBETULAN KEPUTUSAN KEPALA DINAS NOMOR: $nosurat TANGGAL : $tgl_terbit TENTANG PENYELESAIAN KEBERATAN WAJIB PAJAK ATAS SPPT/SKP PBB 
	</td>
  </tr>
  </table>";
  
  $cRet .= "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
	<td height=\"20\" ALIGN=\"CENTER\" colspan=\"6\" VALIGN=\"TOP\">Pasal 1</td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
   <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Memperbaiki/membetulkan Keputusan Kepala Dinas Nomor : $nosurat Tanggal $tgl_terbit atas nama</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
	<td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Nama Wajib Pajak</td>
	<td  height=\"20\" width=\"10\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"3\">: $nm_wp_sppt</td>
  </tr>
  <tr height=\"61\">
    <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
	<td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Alamat Wajib Pajak</td>
	<td  height=\"20\" width=\"10\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"3\">: $kelurahan</td>
  </tr>
  <tr height=\"61\">
    <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
	<td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Letak Objek Pajak</td>
	<td  height=\"20\" width=\"10\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"3\">: $jln_wp_sppt</td>
  </tr>
  <tr height=\"61\">
    <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
	<td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Nomor Wajib Pajak</td>
	<td  height=\"20\" width=\"10\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"3\">: $nop</td>
  </tr>
  <tr height=\"61\">
    <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
	<td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Tahun Pajak</td>
	<td  height=\"20\" width=\"10\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"3\">: $thn_pjk</td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
   <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Sehingga jumlah pajak terhutang yang harus dibayar Menjadi Rp. $pbb_terhutang_sppt</td>
  </tr>  
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
   <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">(".$this->mdata->terbilang($pbb_terhutang_sppt).")</td>
  </tr> 
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
   <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">dengan perhitungan sebagaimana SPPT/SKP terlampir.</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"center\" VALIGN=\"TOP\" colspan=\"6\">Pasal 2</td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
   <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Dengan ditetapkannya Keputusan ini maka keputusan Kepala Dinas Nomor : $nosurat dinyatakan batal dan tidak berlaku.</td>
  </tr>
  
   <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"center\" VALIGN=\"TOP\" colspan=\"6\">Pasal 3</td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
   <td colspan=\"5\" height=\"61\" width=\"549\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Apabila dikemudian hari ternyata terdapat kekeliruan dalam keputusan ini, akan dibetulkan sebagaimana mestinya.</td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Moanamani $tgl_terbit</td> 
  </tr> 
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Kepala Dinas</td> 
  </tr> 
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">SUMIRAN, SH</td> 
  </tr> 
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">NIP. 196311051986021004</td> 
  </tr> 
   </tr>
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">Tembusan	:</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\"></td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">1. Bupati $kabupaten</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">2. Kepala Bidang Pendapatan II</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">3. Kepala Bidang Penatausahaan Keuangan dan Belanaja Pegawai</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">4. Arsip</td> 
  </tr>
  
  </table>";
        //echo $cRet;
        $data['prev']= $cRet;    
        $this->mdata->_mpdf('',$cRet,'15','15',5,'0');
    } 

//________KEBERATAN PAJAK BUMI DAN BANGUNAN
function keberatan_pbb()
    {
        $data['page_title']= 'KEBERATAN PBB';
        $this->template->set('title', 'KEBERATAN PBB');   
        $this->template->load('index','cetak_surat/keberatan_pbb',$data) ; 
    }	

	
function ctk_keberatan_pbb(){

	
        $kdprop = $_REQUEST['kdprop'];
        $kdkab = $_REQUEST['kdkab'];
        $kdkec = $_REQUEST['kdkec'];
        $kdlurah = $_REQUEST['kdlurah'];
        $kdblok = $_REQUEST['kdblok'];
        $nourut = $_REQUEST['nourut'];
        $nosurat = $_REQUEST['nosurat'];
		$nopengajuan = $_REQUEST['nopengajuan'];
		$noterima = $_REQUEST['noterima'];
		$perubahan = $_REQUEST['perubahan'];
		$tmpt_penetapan = $_REQUEST['tmpt_penetapan'];
		$tgl_terbit = $_REQUEST['tgl_terbit'];
		$thn_pjk = $_REQUEST['thn_pjk'];
		$tgl_pengajuan = $_REQUEST['tgl_pengajuan'];
		
		$sql = "	
		SELECT 
		(SELECT nm_propinsi FROM ref_propinsi WHERE kd_propinsi = a.kd_propinsi) AS nm_propinsi,
		(SELECT nm_dati2 FROM ref_dati2 WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2) AS nm_dati2,
		(SELECT nm_kecamatan FROM ref_kecamatan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan) AS nm_kecamatan,
		(SELECT nm_kelurahan FROM ref_kelurahan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan AND kd_kelurahan = a.kd_kelurahan) AS nm_kelurahan,
		a.no_formulir_spop,
		a.nm_kota,
		a.npoptkp,
		a.npoptkp_waris,
		a.rekbphtb
		FROM config a 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $kabupaten = strtoupper($row->nm_dati2);
				$kecamatan = strtoupper($row->nm_kecamatan);
				$kelurahan = strtoupper($row->nm_kelurahan);
             }
        
 		$sql = "
SELECT CONCAT(a.kd_propinsi,'.',a.kd_dati2,'.',a.kd_kecamatan,'.',a.kd_kelurahan,'.',a.kd_blok,'.',a.no_urut,'.',a.kd_jns_op) AS nop, 
a.nm_wp_sppt,a.jln_wp_sppt,b.jalan_op,b.rw_op,b.rt_op,a.thn_pajak_sppt,a.tgl_jatuh_tempo_sppt,
a.pbb_yg_harus_dibayar_sppt,
a.npwp_sppt,
a.jln_wp_sppt,
a.rt_wp_sppt,
a.rw_wp_sppt,
a.luas_bumi_sppt,
a.luas_bng_sppt,
a.njop_bumi_sppt,
a.njop_bng_sppt,
	(SELECT jalan_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS jalan_op,
(SELECT rt_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rt_op,
(SELECT rw_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rw_op,
a.pbb_terhutang_sppt


FROM sppt a LEFT JOIN dat_objek_pajak b 
ON a.kd_propinsi = b.kd_propinsi 
AND a.kd_dati2 = b.kd_dati2 
AND a.kd_kecamatan = b.kd_kecamatan
AND a.kd_kelurahan = b.kd_kelurahan 
AND a.kd_blok = b.kd_blok 
AND a.no_urut = b.no_urut 
WHERE a.kd_propinsi = '$kdprop' 
AND a.kd_dati2='$kdkab' 
AND a.kd_kecamatan='$kdkec' 
AND a.kd_kelurahan='$kdlurah' 
AND a.kd_blok='$kdblok' 
AND a.no_urut='$nourut' 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $nop = strtoupper($row->nop);
                $nm_wp_sppt = strtoupper($row->nm_wp_sppt);
                $npwp_sppt = strtoupper($row->npwp_sppt);
				$rt_wp_sppt = strtoupper($row->rt_wp_sppt);
				$rw_wp_sppt = strtoupper($row->rw_wp_sppt);
				$rt_op = strtoupper($row->rt_op);
				$rw_op = strtoupper($row->rw_op);
                $jln_wp_sppt = strtoupper($row->jln_wp_sppt);
                $jalan_op = strtoupper($row->jalan_op);
				$luas_bumi_sppt = strtoupper($row->luas_bumi_sppt);
				$luas_bng_sppt = strtoupper($row->luas_bng_sppt);
				$njop_bumi_sppt = strtoupper($row->njop_bumi_sppt);
				$njop_bng_sppt = strtoupper($row->njop_bng_sppt);
				$thn_pajak_sppt = strtoupper($row->thn_pajak_sppt);
                $pbb_terhutang_sppt = strtoupper($row->pbb_terhutang_sppt);
                $pbb_yg_harus_dibayar_sppt = strtoupper($row->pbb_yg_harus_dibayar_sppt);
                $tgl_jatuh_tempo_sppt = strtoupper($row->tgl_jatuh_tempo_sppt);				
             }       
        $cRet = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" width=\"549\" ALIGN=\"CENTER\"><b>PEMERINTAH $kabupaten</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\"><b>DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET DAERAH</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\">JL. TRANS PAPUA NABIRE-ENAROTALI KM 200 - MOENAMANI</td>
  </tr>
    <tr height=\"20\">
    <td colspan=\"6\" height=\"20\">
		<HR>
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
  </tr>

  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>KEPUTUSAN KEPALA DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET</B></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">NOMOR $nosurat</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>TENTANG</B></td>
  </tr>
  <tr height=\"20\">
  	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>KEBERATAN PAJAK BUMI DAN BANGUNAN</B></td>
  </tr>
  <tr height=\"20\">
  	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">ATAS SPPT PBB $nop TANGGAL $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"></td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>KEPALA DINAS</B></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
	<td></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Membaca	&nbsp;&nbsp;&nbsp;:</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Surat pengajuan keberatan Pajak Bumi dan Bangunan (PBB) yang diajukan secara perorangan atas nama Wajib Pajak/kuasa dari Wajib Pajak *) $nm_wp_sppt nomor : $nopengajuan tanggal : $tgl_pengajuan atas SPPT nomor $nop tanggal $tgl_terbit Tahun Pajak $thn_pjk yang diterima Dinas Pendapatan Pengelolaan Keuangan dan Aset $kabupaten berdasarkan tanda terima nomor $noterima tanggal $tgl_pengajuan perlu diterbitkan keputusan atas pengajuan Keberatan PBB dimaksud;</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menimbang :</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">bahwa berdasarkan hasil penelitian sebagaimana dituangkan dalam Laporan hasil Penelitian Keberatan Nomor 0002 tanggal $tgl_pengajuan perlu menetapkan Surat Keputusan Keberatan Pajak Bumi dan Bangunan atas pengajuan Keberatan yang dimaksud;</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Mengingat &nbsp; : &nbsp;&nbsp;&nbsp;&nbsp; 1.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Undang-Undang No.12 Tahun 1985 sebagaimana telah diubah dengan Undang-Undang No.12 Tahun 1994</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Peraturan Dinas Pendapatan Pengelolaan Keuangan dan Aset Nomor : 25/PJ/2009 tentang Tata Cara Pengajuan dan Penyelesaian Keberatan Pajak Bumi dan Bangunan;</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">MEMUTUSKAN</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menetapkan :</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">KEPUTUSAN DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET TENTANG KEBERATAN PAJAK BUMI DAN BANGUNAN ATAS SPPT PBB NOMOR $nop TANGGAL $tgl_terbit</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">PERTAMA &nbsp;&nbsp;&nbsp;:</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Menerima seluruhnya atas pengajuan keberatan PBB:</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  a.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Wajib Pajak :</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Nama </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$nm_wp_sppt</td>
  </tr>
  
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">NPWP </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$npwp_sppt</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">Alamat </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$kecamatan RT/RW $rt_wp_sppt/$rw_wp_sppt $kelurahan</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  b.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">SPPT PBB :</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">Nomor </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$nop</td>
  </tr>
  
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">Tanggal </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$tgl_terbit</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Pajak yang Terutang </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">: Rp. $pbb_terhutang_sppt</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  c.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Objek Pajak :</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">Alamat </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$jalan_op RT/RW $rt_op/rw_op</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Desa/Kelurahan </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$kelurahan</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Kecamatan </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">$kecamatan </td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Kabupaten/Kota </td>
	<td height=\"20\" colspan=\"2\" ALIGN=\"LEFT\">:$kabupaten</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">KEDUA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Sesuai dengan diktum PERTAMA, besarnya PBB terutang menjadi sebesar Rp. $perubahan ,- (".$this->mdata->terbilang($perubahan).")</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">KETIGA &nbsp;&nbsp;&nbsp; :</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Perhitungan besarnya PBB yang terutang sebagaimana dimaksud pada diktum KEDUA adalah sebagai berikut :</td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  </table>";
  $cRet .= "<table cellspacing=\"0\" cellpadding=\"0\" ALIGN=\"CENTER\" border=\"1\">
  <tr height=\"20\">
    <td ALIGN=\"CENTER\" height=\"20\" rowspan=\"2\">Uraian</td>
    <td ALIGN=\"CENTER\" colspan=\"2\">Luas (m2)</td>
    <td ALIGN=\"CENTER\" colspan=\"2\"> NJOP/M2 (Rp)</td>
    <td ALIGN=\"CENTER\" height=\"20\" rowspan=\"2\"> Keterangan PBB (Rp)</td>
  </tr>
  <tr height=\"20\">
    <td ALIGN=\"CENTER\" height=\"20\">Bumi</td>
    <td ALIGN=\"CENTER\" >Bangunan</td>
    <td ALIGN=\"CENTER\">Bumi</td>
    <td ALIGN=\"CENTER\">Bangunan</td>
  </tr>
  <tr height=\"20\">
    <td ALIGN=\"CENTER\" height=\"20\">Semula</td>
    <td ALIGN=\"CENTER\">$luas_bumi_sppt</td>
    <td ALIGN=\"CENTER\">$luas_bng_sppt</td>
    <td ALIGN=\"CENTER\">$njop_bumi_sppt</td>
    <td ALIGN=\"CENTER\">$njop_bng_sppt</td>
    <td ALIGN=\"CENTER\">$pbb_terhutang_sppt</td>
  </tr>
  <tr height=\"20\">
    <td ALIGN=\"CENTER\" height=\"20\">Menjadi</td>
	<td ALIGN=\"CENTER\">$luas_bumi_sppt</td>
    <td ALIGN=\"CENTER\">$luas_bng_sppt</td>
    <td ALIGN=\"CENTER\">$njop_bumi_sppt</td>
    <td ALIGN=\"CENTER\">$njop_bng_sppt</td>
    <td ALIGN=\"CENTER\">$perubahan</td>
  </tr>
 
  </table>";
  $cRet .= "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
    <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">KEEMPAT :</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Apabila dikemudian hari ternyata terdapat kekeliruan dalam keputusan Dinas Pendapatan Pengelolaan Keuangan dan Aset ini, kekeliruan tersebut akan dibetulkan sesuai ketentuan berlaku.</td>
  </tr>
     <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
     <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">KELIMA &nbsp;&nbsp;&nbsp;:</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Keputusan Kepala Dinas ini disampaikan kepada:</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">1.Wajib Pajak;</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">2.Kepala Bidang Pendapatan;</td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Ditetapkan di $tmpt_penetapan</td> 
  </tr> 
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">pada tanggal $tgl_pengajuan</td> 
  </tr> 
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Kepala Dinas</td> 
  </tr> 
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">SUMIRAN, SH</td> 
  </tr> 
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">NIP. 196311051986021004</td> 
  </tr> 

  </table>";
        //echo $cRet;
        $data['prev']= $cRet;    
        $this->mdata->_mpdf('',$cRet,'15','15',5,'0');
    }
// PEMBERIAN PENGURANGAN PBB YANG TERUTANG
function pengurangan_pbb()
    {
        $data['page_title']= 'PENGURANGAN PBB TERUTANG';
        $this->template->set('title', 'PENGURANGAN PBB TERUTANG'); 
        $this->template->load('index','cetak_surat/pengurangan_pbb',$data) ; 
    }	

	
function ctk_pengurangan_pbb(){

	
        $kdprop = $_REQUEST['kdprop'];
        $kdkab = $_REQUEST['kdkab'];
        $kdkec = $_REQUEST['kdkec'];
        $kdlurah = $_REQUEST['kdlurah'];
        $kdblok = $_REQUEST['kdblok'];
        $nourut = $_REQUEST['nourut'];
        $nosurat = $_REQUEST['nosurat'];
		$persen = $_REQUEST['persen'];
		$thn_pjk = $_REQUEST['thn_pjk'];
        $tgl_penetapan = $_REQUEST['tgl_penetapan'];
		$tgl_pengajuan = $_REQUEST['tgl_pengajuan'];
		$tmpt_penetapan = $_REQUEST['tmpt_penetapan'];
		
		$sql = "	
		SELECT 
		(SELECT nm_propinsi FROM ref_propinsi WHERE kd_propinsi = a.kd_propinsi) AS nm_propinsi,
		(SELECT nm_dati2 FROM ref_dati2 WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2) AS nm_dati2,
		(SELECT nm_kecamatan FROM ref_kecamatan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan) AS nm_kecamatan,
		(SELECT nm_kelurahan FROM ref_kelurahan WHERE kd_propinsi = a.kd_propinsi AND kd_dati2 = a.kd_dati2 AND kd_kecamatan = a.kd_kecamatan AND kd_kelurahan = a.kd_kelurahan) AS nm_kelurahan,
		a.no_formulir_spop,
		a.nm_kota,
		a.npoptkp,
		a.npoptkp_waris,
		a.rekbphtb
		FROM config a 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $kabupaten = strtoupper($row->nm_dati2);
				$kecamatan = strtoupper($row->nm_kecamatan);
				$kelurahan = strtoupper($row->nm_kelurahan);
             }
        
 		$sql = "
SELECT CONCAT(a.kd_propinsi,'.',a.kd_dati2,'.',a.kd_kecamatan,'.',a.kd_kelurahan,'.',a.kd_blok,'.',a.no_urut,'.',a.kd_jns_op) AS nop, 
a.nm_wp_sppt,a.jln_wp_sppt,b.jalan_op,b.rw_op,b.rt_op,a.thn_pajak_sppt,a.tgl_jatuh_tempo_sppt,
a.pbb_yg_harus_dibayar_sppt,
a.npwp_sppt,
a.jln_wp_sppt,
a.rt_wp_sppt,
a.rw_wp_sppt,
	(SELECT jalan_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS jalan_op,
(SELECT rt_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rt_op,
(SELECT rw_op FROM dat_objek_pajak 
	WHERE kd_propinsi = '$kdprop' 
	AND kd_dati2='$kdkab' 
	AND kd_kecamatan='$kdkec' 
	AND kd_kelurahan='$kdlurah' 
	AND kd_blok='$kdblok' 
	AND no_urut='$nourut') 
AS rw_op,
a.pbb_terhutang_sppt


FROM sppt a LEFT JOIN dat_objek_pajak b 
ON a.kd_propinsi = b.kd_propinsi 
AND a.kd_dati2 = b.kd_dati2 
AND a.kd_kecamatan = b.kd_kecamatan
AND a.kd_kelurahan = b.kd_kelurahan 
AND a.kd_blok = b.kd_blok 
AND a.no_urut = b.no_urut 
WHERE a.kd_propinsi = '$kdprop' 
AND a.kd_dati2='$kdkab' 
AND a.kd_kecamatan='$kdkec' 
AND a.kd_kelurahan='$kdlurah' 
AND a.kd_blok='$kdblok' 
AND a.no_urut='$nourut' 
		";        
		     $hasil = $this->db->query($sql);
             $i = 0;
             foreach ($hasil->result() as $row)
             {
                $nop = strtoupper($row->nop);
                $nm_wp_sppt = strtoupper($row->nm_wp_sppt);
                $npwp_sppt = strtoupper($row->npwp_sppt);
				$rt_wp_sppt = strtoupper($row->rt_wp_sppt);
				$rw_wp_sppt = strtoupper($row->rw_wp_sppt);
				$rt_op = strtoupper($row->rt_op);
				$rw_op = strtoupper($row->rw_op);
                $jln_wp_sppt = strtoupper($row->jln_wp_sppt);
                $jalan_op = strtoupper($row->jalan_op);
				
                $thn_pajak_sppt = strtoupper($row->thn_pajak_sppt);
                $pbb_terhutang_sppt = strtoupper($row->pbb_terhutang_sppt);
                $pbb_yg_harus_dibayar_sppt = strtoupper($row->pbb_yg_harus_dibayar_sppt);
                $tgl_jatuh_tempo_sppt = strtoupper($row->tgl_jatuh_tempo_sppt);
					
             }  
		$a= $persen * $pbb_terhutang_sppt;
		$hasil = $a / 100;	
		$kurang = $pbb_terhutang_sppt - $hasil;		
		$terutang_sppt = number_format($pbb_terhutang_sppt,2,'.',',');	
		$hsl = number_format($hasil,2,'.',',');
		$krng = number_format($kurang,2,'.',',');
		
        $cRet = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
		
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" width=\"549\" ALIGN=\"CENTER\"><b>PEMERINTAH $kabupaten</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\"><b>DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET DAERAH</b></td>
  </tr>
  <tr height=\"20\">
    <td colspan=\"6\" height=\"20\" ALIGN=\"CENTER\">JL. TRANS PAPUA NABIRE-ENAROTALI KM 200 - MOENAMANI</td>
  </tr>
    <tr height=\"20\">
    <td colspan=\"6\" height=\"20\">
		<HR>
	</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"  width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
    <td width=\"140\"></td>
  </tr>

  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>KEPUTUSAN KEPALA DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET</B></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">NOMOR: $nosurat</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>TENTANG</B></td>
  </tr>
  <tr height=\"20\">
  	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><B>PEMBERIAN PENGURANGAN</B></td>
  </tr>
  <tr height=\"20\">
  	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"><b>PAJAK BUMI DAN BANGUNAN YANG TERUTANG</B></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Memperhatikan	&nbsp;&nbsp;&nbsp;:</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Surat Permohonan pengurangan pajak terutang pada tanggal $tgl_pengajuan, $nosurat dari Wajib Pajak $nm_wp_sppt.</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menimbang &nbsp; : &nbsp;&nbsp; a.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">bahwa hasil pemeriksaan sederhana kantor/pemeriksaan sederhana lapangan dengan surat permohonan pengurangan Pajak sebagaimana dalam berita acara pemeriksaan sederhana kantor tanggal $tgl_pengajuan dan berita acara pemeriksaan sederhana lapangan tanggal $tgl_pengajuan nomor: $nosurat</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  b.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">bahwa setelah dipertimbangkan, maka besar pajak yang disetujui perlu ditetapkan denga keputusan Kepala Dinas.</td>
  </tr>
    <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Mengingat &nbsp; : &nbsp;&nbsp;&nbsp;&nbsp; 1.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Undang-undang nomor 28 tahun 2009 tentang Pajak Daerah dan Retribusi Daerah </td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Pasal 21 Peraturan Bupati $kabupaten No.72 Tahun 2011 Tanggal 10 Juni 20011 tentang Pembetulan, Pembatalan, Pengurangan, Ketetapan, dan Penghapusan dan atau Pengurangan sangsi Administratif </td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">MEMUTUSKAN</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">Menetapkan :</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">KEPUTUSAN KEPALA DINAS PENDAPATAN PENGELOLAAN KEUANGAN DAN ASET TENTANG PENGURANGAN PAJAK BUMI DAN BANGUNAN</td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">Pasal 1</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\">(1). Mengabulkan seluruh permohonan Pengurangan Pajak Bumi dan Bangunan yang terutang Kepada:</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">PERTAMA &nbsp;&nbsp;&nbsp;:</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Menerima seluruhnya atas pengajuan keberatan PBB:</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  a.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Wajib Pajak :</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Nama </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$nm_wp_sppt</td>
  </tr>
  
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">NPWP </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$npwp_sppt</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">Alamat </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">: $kecamatan RT/RW $rt_wp_sppt/$rw_wp_sppt $kelurahan</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">NOP </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$nop</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">Tahun Pajak </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$thn_pjk</td>
  </tr>
 
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  b.</td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">Objek Pajak :</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\" ALIGN=\"LEFT\">NOP </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$nop</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Pajak Terutang </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:Rp. $terutang_sppt</td>
  </tr>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Alamat </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$jalan_op, $rt_wp_sppt/$rw_wp_sppt $kelurahan</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Desa/Kelurahan </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$kelurahan</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Kecamatan </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$kecamatan </td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\">Kabupaten/Kota </td>
	<td height=\"20\" colspan=\"3\" ALIGN=\"LEFT\">:$kabupaten</td>
  </tr>
  <tr height=\"20\">
  <td height=\"20\" ALIGN=\"LEFT\" VALIGN=\"TOP\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </td>
	<td height=\"20\" colspan=\"5\" ALIGN=\"LEFT\">sebesar $persen % (".$this->mdata->terbilang($persen).") persen dari PBB yang terutang</td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\">(2). Besarnya PBB yang harus dibayar atas penetapan sebagaimana dimaksud pada ayat (1) adalah sebagai berikut:</td>
  </tr>
  <tr height=\"20\">
   <td height=\"20\"  ALIGN=\"LEFT\" VALIGN=\"TOP\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"3\">a. Pajak Terutang menurut SKP SPOP</td>
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\">Rp. $terutang_sppt</td>
  </tr>
  <tr height=\"20\">
    <td height=\"20\"  ALIGN=\"LEFT\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"3\">b. Besar Pengurangan </td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"2\"></td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\"  ALIGN=\"LEFT\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"3\">$persen% x Rp. $terutang_sppt </td>
	<td height=\"20\" ALIGN=\"LEFT\" colspan=\"2\">Rp. $hsl</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\"  ALIGN=\"LEFT\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"3\"> </td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"2\">____________________</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" ALIGN=\"LEFT\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\"  colspan=\"3\">c. Jumlah Pajak terutang setelah Pengurangan (a-b)</td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"2\">Rp. $krng</td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\"  ALIGN=\"LEFT\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\"></td>
	<td height=\"20\"  ALIGN=\"LEFT\" colspan=\"4\">(".$this->mdata->terbilang($kurang).")</td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" colspan=\"6\" ALIGN=\"CENTER\">Pasal 2 </td>
  </tr>
  <tr height=\"20\">
	<td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\">Apabila dikemudian hari diketahui terdapat kekeliruan dalam Keputusan ini, maka akan dibetulkan sesuai ketentuan yang berlaku. </td>
  </tr>
   <tr height=\"20\">
    <td height=\"20\" colspan=\"6\" ALIGN=\"LEFT\"></td>
  </tr>
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Ditetapkan di $tmpt_penetapan</td> 
  </tr> 
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">pada tanggal $tgl_pengajuan</td> 
  </tr> 
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">Kepala Dinas</td> 
  </tr> 
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
    <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
  <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">SUMIRAN, SH</td> 
  </tr> 
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\"></td>
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"2\">NIP. 196311051986021004</td> 
  </tr> 
  <tr height=\"40\">
    <td height=\"50\" colspan=\"6\"></td>
  </tr>
	<tr height=\"40\">
    <td height=\"50\" colspan=\"6\"></td>
  </tr>   
    <tr height=\"40\">
    <td height=\"50\" colspan=\"6\"></td>
  </tr>
	<tr height=\"40\">
    <td height=\"50\" colspan=\"6\"></td>
  </tr>   
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr> 
  <tr height=\"40\">
    <td height=\"20\"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">Tembusan Surat Keputusan ini disampaikan kepada Yth:</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\"></td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">1. Walikota $kabupaten</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">2. Kepala Bidang Pendapatan II</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">3. Kepala Bidang Penatausahaan Keuangan dan Belanaja Pegawai</td> 
  </tr>
  <tr height=\"61\">
   <td height=\"20\" width=\"50\" ALIGN=\"LEFT\" VALIGN=\"TOP\" colspan=\"6\">4. Arsip</td> 
  </tr>
  </table>";
        //echo $cRet;
        $data['prev']= $cRet;    
        $this->mdata->_mpdf('',$cRet,'15','15',5,'0');
    }



}